 <!--
 用法
<#import "/WEB-INF/view/pager_footer.html" as page>  
<@page.pagination PagerView=pager/>
--> 
<#macro pagination PagerView>  
<div class="epages clearfix">
	<#if PagerView.pageCount != 0>
		<div class="pagepanel">
			<#assign listpagenum = 5/>
			<#-- 起始下标-->
			<#assign listbegin = (PagerView.pn - listpagenum)/>
			<#if (listbegin < 1) >
				<#assign listbegin = 1 />
			</#if>
			
			<#-- 终止下标-->
			<#assign listend = (PagerView.pn + listpagenum -1) />
			<#if (listend > PagerView.pageCount) >
				<#assign listend = PagerView.pageCount/>
			</#if>
			
			<#-- 请求url+Page中附带参数-->
			<#assign url= PagerView.pagerFooter.httpPath+"?"+PagerView.pagerFooter.parameter/>
			
			<span>共${PagerView.pageCount}页  ${PagerView.totalCount}条</span>
			<#if PagerView.pn != 1>
				<a href="${url}pn=1">首页</a> 
				<a href="${url}pn=${PagerView.pn - 1}">上一页</a>
			<#else>
				<span>首页</span> 
				<span>上一页</span>
			</#if>
			<#list listbegin..listend as index>
				<#if index != PagerView.pn>
					<a href="${url}pn=${index}">${index}</a>
				<#else> 
					<b>${index}</b>
				</#if> 
			</#list>
			<#if PagerView.pn != PagerView.pageCount>
				<a href="${url}pn=${PagerView.pn + 1}">下一页</a> 
				<a href="${url}pn=${PagerView.pageCount}">末页</a>
			<#else>
				<span>下一页</span>
				<span>末页</span>
			</#if>
		</div>
	<#else>
	    <span>共0页  0条</span>
	</#if>
</div>
</#macro> 